/*
 * OREKIT-X
 * Copyright 2002-2008 CS Communication & Systemes
 * 
 * Parts of this software package have been licensed to CS
 * Communication & Systemes (CS) under one or more contributor license
 * agreements.  See the NOTICE file distributed with this work for
 * additional information.
 *  
 * This is an experimental copy of OREKIT from www.orekit.org.
 * Please use the original OREKIT from orekit.org for normal work
 * unrelated to this research project.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you
 * may not use this file except in compliance with the License.  You
 * may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied.  See the License for the specific language governing
 * permissions and limitations under the License.
 */
package ore.propagation.sampling;

import ore.SpacecraftState;
import ore.errors.OrekitException;
import ore.errors.PropagationException;
import ore.time.AbsoluteDate;

/** 
 * Space dynamics step interpolator interface.
 *
 * This class is like the <code>StepInterpolator</code> interface from Commons Math, but
 * integrates with the space dyamics component hierarchy.
 * 
 * @author Luc Maisonobe
 */
public interface OrekitStepInterpolator
    extends java.io.Serializable
{
    /** 
     * @return Current grid date
     */
    public AbsoluteDate getCurrentDate();
    /** 
     * @return Previous grid date
     */
    public AbsoluteDate getPreviousDate();
    /** 
     * If {@link #setInterpolatedDate(AbsoluteDate)
     * setInterpolatedDate} has not been called, the date returned is
     * the same as {@link #getCurrentDate() getCurrentDate}.
     * 
     * @return interpolated date
     */
    public AbsoluteDate getInterpolatedDate();
    /** 
     * It is possible to set the interpolation date outside of the current
     * step range, but accuracy will decrease as date is farther.
     * 
     * @param date Interpolated date to set
     * 
     * @exception PropagationException The interpolator cannot handle
     * the argument date
     */
    public void setInterpolatedDate(AbsoluteDate date)
        throws PropagationException;
    /** 
     * @return The interpolated state at the current interpolation date
     * 
     * @exception OrekitException The state cannot be interpolated or converted
     */
    public SpacecraftState getInterpolatedState() throws OrekitException;
    /** 
     * @return True if integration is forward in date
     */
    public boolean isForward();
}
